package com.tristia.entity;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "people"
})
@XmlRootElement(name = "people")
public class People {

    @XmlElement(name="person", required = true)
    protected List<Person> people;

    public List<Person> getPeople() {
        if (people == null) {
        	people = new ArrayList<Person>();
        }
        return this.people;
    }
    
    @Override
    public String toString() {
        return (this.people != null) ? "{\"people\": " + this.people.toString() + "}" : "{people:[]}";
    }
}
